<?
class Amxx_View_Table_User_Action extends iMVC_View_Table_Node_Abstract{
    public $tagName='td';
    public $text;
    public $classPrefix='iweb-table-col';    
    public $url;
    public $forUrl;
    public $baseUrl;
    

    function __construct($baseUrl,$url,$forUrl){
        $this->text='删除'; 
        $this->url=$baseUrl.$url;
        $this->forUrl=$baseUrl.$forUrl;
    
    
    }

    public function getNode($row,$col,$rs,$doc){
    
        $node=$doc->createElement($this->tagName); 
        $cNode=$doc->createElement('a');   
        $cNode->setAttribute('href',$this->url.$rs[$row]['user_id']);
        $cNode->nodeValue=$this->text;
        $sNode=$doc->createElement('a');
        $sNode->setAttribute('href',$this->forUrl.$rs[$row]['user_id']);
        if($rs[$row]['user_canuse']==1){
            $sNode->nodeValue='禁用';
        }
        else{
            $sNode->nodeValue='启用';
        }
        $node->setAttribute('class',$this->classPrefix.$row);
        $node->appendChild($cNode);
        $node->appendChild($sNode); 

        return $node; 
    }



}


// vim600:ts=4 st=4 foldmethod=marker foldmarker=<<<,>>>
// vim600:syn=php commentstring=//%s
